{% extends "prof_base.html" %}

{% block title %}
Index
{% endblock title %}

{% block extrahead %}
$(function() {
		$('#botao_home').addClass('active');
	});
	
{% endblock extrahead %}

{% block content %}


<div class="content-box">
    <div class="box-body">
	<div class="box-header clear">
	    <ul class="tabs clear">
		<li><a href="#tab1">Aulas do dia</a></li>
		<li><a href="#tab2">Bloco de notas</a></li>
	    </ul>
	</div>
	<div class="box-wrap clear">
   	<div id="tab1" style="display: none;">
		<div class="box-header clear">
			<h2>Aulas de hoje - {{hoje}}</h2>
		</div>
		<div class="box-wrap clear">
		<!-- DATA-TABLE JS PLUGIN -->
		<div id="data-table">
			<form method="post" action="">
				<table class="style1 datatable">
				<thead>
					<tr>
						<th>Professor:</th>
						<th>Local:</th>
						<th>Aluno:</th>
						<th>Inicío:</th>
						<th>Fim:</th>
						<th>Valor:</th>
						<th>Tipo:</th>
					</tr>
				</thead>
				<tbody>
					{% for aula in lista_aulas %}
						<tr>
							<td>{{aula.professor.detalheusuario.nome}}</td>
							<td>{{aula.local}}</td>
							<td>{% for nome in aula.aluno.all %} {{nome}} <br> {% endfor %} </td>
							<td>{{aula.inicio.time}}</td>
							<td>{{aula.fim.time}}</td>
							<td>{{aula.valor}}</td>
							<td>{{aula.tipo}}</td>
						</tr>
					{% endfor %}                                        
				</tbody>
				</table>
					<div class="tab-footer clear fl">                                        
				</div>
			</form>
		</div><!-- /#table -->                        
		</div><!-- end of box-wrap -->
	</div>
	<div id="tab2" style="display: none;">
		<cufon class="cufon cufon-canvas" alt="Agenda " style="width: 64px; height: 18px;"><canvas width="84" height="22" style="width: 84px; height: 22px; top: -3px; left: -3px;"></canvas><cufontext>Contents </cufontext></cufon>
			        {% if erro %}
                <div class="notification note-error">
                        <a href="#" class="close" title="Close notification">close</a>
                        <p><strong>Erro no Sistema:</strong> Tente novamente mais tarde.</p>
                </div>
		{% endif %}
		{% if success %}
			<div class="notification note-success">
				<a href="#" class="close" title="Close notification">close</a>
				<p><strong>Anotação salva com sucesso!</strong></p>
			</div>
		{% endif %}	
		<form action="/prof_index/" method="POST" class="validate-form form bt-space15" action="" onSubmit="return confirm('Você deseja realmente enviar esses dados?');">
			<div class="columns clear bt-space15">
				<div class="col2-3">
					<table>
						{% for field in usuario_form %}
						<tr>
						    <th>{{ field.label_tag }}:</th>
						    <td>{{ field }} {{ field.errors }}</td>
						</tr>
						{% endfor %}
					</table>
				</div>
			</div>
		<table class="botoes">
			<td><input type="submit" class="button green size-120 fl" value="Salvar Dados" />
		</table>
		</form>
	</div>
    </div>

{% endblock content %}